﻿<?php
include("../Modules/admin_resist_mdl.php");
// include('doctype.htm');
?>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" type="text/javascript"> 
	

</script>

</head>

<body>
<script language="javascript">
	
	// Kiem tra cac truong trong form co bi bo trong hay khong
	function emptyCheck()
	{
		if ( (document.frmEditSV.txtMSSV.value == "")  ||
			 (document.frmEditSV.txtHoTen.value == "") 		)
		
				document.frmEditSV.smtSV.disabled = true;
		
		else document.frmEditSV.smtSV.disabled = false;
	}
	
</script>

<h4>Sửa thông tin sinh viên</h4>

<?php
	include("../../Modules/conn.php");
	
	$mssv = @$_GET["mssv"];
	$query = "select * from sinh_vien where MSSV = '$mssv'";
	$result = mysql_query($query);
	$row = mysql_fetch_array($result);
?>

<form method="POST" action="../Modules/admin_editsv.php?mssv=<?php echo $mssv; ?>" name="frmEditSV" onreset="this.smtSV.disabled = true">
	<ul>
		<li>
			<span>MSSV</span>
			<input type="text" name="txtMSSV" value="<?php echo $row['MSSV']; ?>" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<span>Họ và tên</span>
			<input type="text" name="txtHoTen" value="<?php echo $row['TEN_SV']; ?>" onkeyup="emptyCheck();">
		</li>
		
		<li>
			<input type="submit" value="Lưu" name="smtSV" disabled="true">
			<input type="reset" value="Nhập lại" name="resSV">
		</li>
	</ul>
</form>

</body>

</html>